﻿namespace Fiddler
{
    using System;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Drawing;
    using System.Globalization;
    using System.Security.Cryptography.X509Certificates;
    using System.Text;
    using System.Windows.Forms;

    internal class frmOptions : Form
    {
        private Button btnApply;
        private Button btnCancel;
        private Button btnChooseCompare;
        private Button btnChooseFSE;
        private Button btnChooseTextEditor;
        private Button btnCleanCertificateStore;
        private Button btnExportRoot;
        private Button btnSetBGColor;
        private CheckBox cbAllowRemote;
        private CheckBox cbAlwaysShowTrayIcon;
        private CheckBox cbAttachOnStartup;
        private CheckBox cbAutoCheckForUpdates;
        private CheckBox cbAutoReloadScript;
        private CheckBox cbCaptureCONNECT;
        private CheckBox cbCaptureFTP;
        private CheckBox cbDecryptHTTPS;
        private CheckBox cbEnableIPv6;
        private CheckBox cbFIP;
        private CheckBox cbHideOnMinimize;
        private CheckBox cbHookAllConnections;
        private CheckBox cbHookWithPAC;
        private CheckBox cbIgnoreServerCertErrors;
        private CheckBox cbMapSocketToProcess;
        private CheckBox cbReportHTTPErrors;
        private CheckBox cbResetSessionIDOnListClear;
        private CheckBox cbReuseClientSockets;
        private CheckBox cbReuseServerSockets;
        private CheckBox cbStreamVideo;
        private CheckBox cbUseGateway;
        private CheckBox cbUseSmartScroll;
        private ComboBox cbxDecryptList;
        private ComboBox cbxFontSize;
        private ComboBox cbxHotkeyMod;
        private CheckedListBox clbConnections;
        private IContainer components;
        private OpenFileDialog dlgChooseEditor;
        private ColorDialog dlgPickColor;
        private GroupBox gbAutoFiddles;
        private GroupBox gbScript;
        private Label label2;
        private Label label3;
        private Label lblAssemblyReferences;
        private Label lblConns;
        private Label lblExplainConn;
        private Label lblFiddlerBypass;
        private Label lblFontSize;
        private Label lblHotkey;
        private Label lblHTTPSDescription;
        private Label lblRequiresRestart;
        private Label lblSkipDecryption;
        private Label lblToolsCompare;
        private LinkLabel lnkCopyPACURL;
        private LinkLabel lnkFindExtensions;
        private LinkLabel lnkHookup;
        private LinkLabel lnkHTTPSIntercept;
        private LinkLabel lnkOptionsHelp;
        private LinkLabel lnkShowGatewayInfo;
        private Panel pnlOptionsFooter;
        private TabPage tabAppearance;
        private TabPage tabConnections;
        private TabPage tabExtensions;
        private TabPage tabGeneral;
        private TabPage tabHTTPS;
        private TabControl tabsOptions;
        private TabPage tabTools;
        private ToolTip toolTip1;
        private TextBox txtCompareTool;
        private RichTextBox txtExtensions;
        private TextBox txtFiddlerBypass;
        private TextBox txtHotkey;
        private TextBox txtListenPort;
        private TextBox txtScriptEditor;
        private TextBox txtScriptReferences;
        private TextBox txtSkipDecryption;
        private TextBox txtTextEditor;

        internal frmOptions()
        {
            this.InitializeComponent();
            this.txtExtensions.BackColor = CONFIG.colorDisabledEdit;
            this.cbFIP.Visible = false;
        }

        private void actApplyChanges()
        {
            try
            {
                int num;
                CONFIG.bAttachOnBoot = this.cbAttachOnStartup.Checked;
                CONFIG.bVersionCheck = this.cbAutoCheckForUpdates.Checked;
                CONFIG.bFIP = this.cbFIP.Checked;
                CONFIG.bAutoLoadScript = this.cbAutoReloadScript.Checked;
                CONFIG.bReuseServerSockets = this.cbReuseServerSockets.Checked;
                CONFIG.bReuseClientSockets = this.cbReuseClientSockets.Checked;
                CONFIG.bHideOnMinimize = this.cbHideOnMinimize.Checked;
                CONFIG.bResetCounterOnClear = this.cbResetSessionIDOnListClear.Checked;
                CONFIG.bReportHTTPErrors = this.cbReportHTTPErrors.Checked;
                CONFIG.JSEditor = this.txtScriptEditor.Text;
                if (this.txtCompareTool.Text != CONFIG.GetPath("WINDIFF"))
                {
                    FiddlerApplication.Prefs.SetStringPref("fiddler.config.path.differ", this.txtCompareTool.Text);
                }
                if (this.txtCompareTool.Text != CONFIG.GetPath("TextEditor"))
                {
                    FiddlerApplication.Prefs.SetStringPref("fiddler.config.path.texteditor", this.txtTextEditor.Text);
                }
                CONFIG.bAllowRemoteConnections = this.cbAllowRemote.Checked;
                CONFIG.bHookWithPAC = this.cbHookWithPAC.Checked;
                CONFIG.m_sAdditionalScriptReferences = this.txtScriptReferences.Text;
                if ((int.TryParse(this.txtListenPort.Text, out num) && (num > 0)) && (num < 0xffff))
                {
                    CONFIG.ListenPort = num;
                }
                CONFIG.bForwardToGateway = this.cbUseGateway.Checked;
                CONFIG.bCaptureCONNECT = this.cbCaptureCONNECT.Checked;
                CONFIG.bCaptureFTP = this.cbCaptureFTP.Checked;
                CONFIG.bEnableIPv6 = this.cbEnableIPv6.Checked;
                CONFIG.sHostsThatBypassFiddler = this.txtFiddlerBypass.Text.Trim();
                CONFIG.bHookAllConnections = this.cbHookAllConnections.Checked;
                if (this.txtHotkey.Text.Length == 1)
                {
                    int num2 = this.txtHotkey.Text[0];
                    if (CONFIG.iHotkey != num2)
                    {
                        MessageBox.Show("New hotkey will take effect after Fiddler is restarted.", "Restart Required");
                    }
                    CONFIG.iHotkey = num2;
                }
                switch (this.cbxHotkeyMod.SelectedIndex)
                {
                    case 0:
                        CONFIG.iHotkeyMod = 8;
                        break;

                    case 2:
                        CONFIG.iHotkeyMod = 6;
                        break;

                    default:
                        CONFIG.iHotkeyMod = 3;
                        break;
                }
                CONFIG.bMITM_HTTPS = this.cbDecryptHTTPS.Checked;
                CONFIG.IgnoreServerCertErrors = this.cbIgnoreServerCertErrors.Checked;
                CONFIG.DecryptWhichProcesses = (ProcessFilterCategories) this.cbxDecryptList.SelectedIndex;
                FiddlerApplication.Prefs.SetStringPref("fiddler.network.https.NoDecryptionHosts", this.txtSkipDecryption.Text);
                CONFIG.bAlwaysShowTrayIcon = this.cbAlwaysShowTrayIcon.Checked;
                CONFIG.bSmartScroll = this.cbUseSmartScroll.Checked;
                CONFIG.bStreamAudioVideo = this.cbStreamVideo.Checked;
                CONFIG.bMapSocketToProcess = this.cbMapSocketToProcess.Checked;
                if ((this.cbxFontSize.SelectedIndex > -1) && (CONFIG.flFontSize != float.Parse(this.cbxFontSize.Text, NumberStyles.Float, CultureInfo.InvariantCulture)))
                {
                    CONFIG.flFontSize = float.Parse(this.cbxFontSize.Text, NumberStyles.Float, CultureInfo.InvariantCulture);
                    FiddlerApplication._frmMain.actSetFontSize(CONFIG.flFontSize);
                }
            }
            catch (Exception exception)
            {
                FiddlerApplication.ReportException(exception, "ApplySettings Failure");
            }
            base.Close();
        }

        private void btnApply_Click(object sender, EventArgs e)
        {
            this.actApplyChanges();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            base.Close();
        }

        private void btnChooseCompare_Click(object sender, EventArgs e)
        {
            if (DialogResult.OK == this.dlgChooseEditor.ShowDialog(this))
            {
                this.txtCompareTool.Text = this.dlgChooseEditor.FileName;
            }
        }

        private void btnChooseEditor_Click(object sender, EventArgs e)
        {
            if (DialogResult.OK == this.dlgChooseEditor.ShowDialog(this))
            {
                this.txtScriptEditor.Text = this.dlgChooseEditor.FileName;
            }
        }

        private void btnChooseTextEditor_Click(object sender, EventArgs e)
        {
            if (DialogResult.OK == this.dlgChooseEditor.ShowDialog(this))
            {
                this.txtTextEditor.Text = this.dlgChooseEditor.FileName;
            }
        }

        private void btnCleanCertificateStore_Click(object sender, EventArgs e)
        {
            try
            {
                bool flag = false;
                if (CertMaker.rootCertIsMachineTrusted())
                {
                    X509Certificate2 rootCertificate = CertMaker.GetRootCertificate();
                    if (rootCertificate != null)
                    {
                        string subject = rootCertificate.Subject;
                        if (!string.IsNullOrEmpty(subject))
                        {
                            flag = Utilities.RunExecutableAndWait(CONFIG.GetPath("App") + "TrustCert.exe", string.Format("-u \"{0}\"", subject));
                        }
                    }
                }
                if (CertMaker.removeFiddlerGeneratedCerts() || flag)
                {
                    MessageBox.Show(string.Format("Fiddler-generated certificates have been removed from {0}", flag ? "both User and Machine Root storage." : "the Current User storage."), "Success");
                }
            }
            catch (Exception exception)
            {
                FiddlerApplication.ReportException(exception);
            }
        }

        private void btnExportRoot_Click(object sender, EventArgs e)
        {
            if (CertMaker.exportRootToDesktop())
            {
                MessageBox.Show("The file FiddlerRoot.cer has been exported to your desktop.", "Success");
            }
            else
            {
                MessageBox.Show("Unable to export Fiddler's Root Certificate.", "Failed");
            }
        }

        private void btnSetBGColor_Click(object sender, EventArgs e)
        {
            this.dlgPickColor.FullOpen = true;
            this.dlgPickColor.Color = CONFIG.colorDisabledEdit;
            if (DialogResult.OK == this.dlgPickColor.ShowDialog(this))
            {
                if (this.dlgPickColor.Color.ToArgb() == -1)
                {
                    MessageBox.Show("Sorry, you cannot set the disabled control color to white.", "Invalid Selection");
                }
                else
                {
                    CONFIG.colorDisabledEdit = this.dlgPickColor.Color;
                    this.btnSetBGColor.BackColor = CONFIG.colorDisabledEdit;
                    this.btnSetBGColor.ForeColor = Utilities.GetContrastingTextColor(CONFIG.colorDisabledEdit);
                }
            }
        }

        private void cbAllowRemote_Click(object sender, EventArgs e)
        {
            if (this.cbAllowRemote.Checked)
            {
                MessageBox.Show("Fiddler must be restarted for this change to take effect.\n\nYou may see a prompt from your Firewall requesting permission to Allow Remote Access after restarting Fiddler. If you do not, you may need to reconfigure your firewall manually.", "Note on Remote Clients");
            }
        }

        private void cbAlwaysShowTrayIcon_CheckedChanged(object sender, EventArgs e)
        {
            FiddlerApplication.UI.notifyIcon.Visible = this.cbAlwaysShowTrayIcon.Checked;
        }

        private void cbCaptureCONNECT_CheckedChanged(object sender, EventArgs e)
        {
            if (!this.cbCaptureCONNECT.Checked)
            {
                this.cbDecryptHTTPS.Enabled = this.cbDecryptHTTPS.Checked = this.cbIgnoreServerCertErrors.Visible = this.cbIgnoreServerCertErrors.Checked = false;
            }
            else
            {
                this.cbDecryptHTTPS.Enabled = true;
            }
        }

        private void cbDecryptHTTPS_CheckedChanged(object sender, EventArgs e)
        {
            if (!this.cbDecryptHTTPS.Checked)
            {
                this.btnExportRoot.Visible = this.lblSkipDecryption.Visible = this.txtSkipDecryption.Visible = this.cbxDecryptList.Visible = this.cbIgnoreServerCertErrors.Visible = this.cbIgnoreServerCertErrors.Checked = false;
            }
            else
            {
                this.btnExportRoot.Visible = this.lblSkipDecryption.Visible = this.txtSkipDecryption.Visible = this.cbxDecryptList.Visible = this.cbIgnoreServerCertErrors.Visible = true;
            }
            this.btnCleanCertificateStore.Enabled = !this.cbDecryptHTTPS.Checked;
        }

        private void cbDecryptHTTPS_Click(object sender, EventArgs e)
        {
            if (!this.cbDecryptHTTPS.Checked)
            {
                CONFIG.bMITM_HTTPS = false;
            }
            else
            {
                Application.DoEvents();
                if ((CertMaker.rootCertExists() || CertMaker.createRootCert()) && !CertMaker.rootCertIsTrusted())
                {
                    frmAlert alert = new frmAlert("SCARY TEXT AHEAD: Read Carefully!", "To intercept HTTPS traffic, Fiddler generates a unique root certificate.\n\nYou may configure Windows to trust this CA certificate to suppress\nsecurity warnings.\n\nClick 'Yes' to reconfigure Windows' Trusted CA list.\nClick 'No' if this is all geek to you.", "Trust the Fiddler Root certificate?", MessageBoxButtons.YesNo, MessageBoxDefaultButton.Button2);
                    alert.TopMost = true;
                    alert.StartPosition = FormStartPosition.CenterScreen;
                    DialogResult result = alert.ShowDialog();
                    alert.Dispose();
                    if (((DialogResult.Yes == result) && CertMaker.trustRootCert()) && FiddlerApplication.Prefs.GetBoolPref("fiddler.CertMaker.OfferMachineTrust", (Environment.OSVersion.Version.Major > 6) || ((Environment.OSVersion.Version.Major == 6) && (Environment.OSVersion.Version.Minor > 1))))
                    {
                        string subject = CertMaker.GetRootCertificate().Subject;
                        Utilities.RunExecutable(CONFIG.GetPath("App") + "TrustCert.exe", string.Format("\"{0}\"", subject));
                    }
                }
            }
        }

        private void cbFIP_Click(object sender, EventArgs e)
        {
            if (this.cbFIP.Checked && (DialogResult.Cancel == MessageBox.Show("When the Fiddler Improvement Program is enabled, Fiddler will upload anonymous usage and configuration on startup.\n\nThank you for helping to improve Fiddler!", "Joining the Fiddler Improvement Program", MessageBoxButtons.OKCancel, MessageBoxIcon.Asterisk)))
            {
                this.cbFIP.Checked = false;
            }
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void frmOptions_Load(object sender, EventArgs e)
        {
            try
            {
                this.cbAttachOnStartup.Checked = CONFIG.bAttachOnBoot;
                this.cbAutoCheckForUpdates.Checked = CONFIG.bVersionCheck;
                this.cbAutoCheckForUpdates.Enabled = !CONFIG.bVersionCheckBlocked;
                this.cbFIP.Checked = CONFIG.bFIP;
                this.cbAutoReloadScript.Checked = CONFIG.bAutoLoadScript;
                this.cbHideOnMinimize.Checked = CONFIG.bHideOnMinimize;
                this.cbResetSessionIDOnListClear.Checked = CONFIG.bResetCounterOnClear;
                this.txtScriptEditor.Text = CONFIG.JSEditor;
                this.txtTextEditor.Text = CONFIG.GetPath("TextEditor");
                this.txtCompareTool.Text = CONFIG.GetPath("WINDIFF");
                this.cbAllowRemote.Checked = CONFIG.bAllowRemoteConnections;
                this.cbHookWithPAC.Checked = CONFIG.bHookWithPAC;
                this.cbCaptureCONNECT.Checked = CONFIG.bCaptureCONNECT;
                this.cbCaptureFTP.Checked = CONFIG.bCaptureFTP;
                this.cbEnableIPv6.Checked = CONFIG.bEnableIPv6;
                this.cbDecryptHTTPS.Checked = CONFIG.bMITM_HTTPS;
                this.txtSkipDecryption.Text = FiddlerApplication.Prefs.GetStringPref("fiddler.network.https.NoDecryptionHosts", string.Empty);
                try
                {
                    this.cbxDecryptList.SelectedIndex = (int) CONFIG.DecryptWhichProcesses;
                }
                catch
                {
                    this.cbxDecryptList.SelectedIndex = 0;
                }
                this.cbIgnoreServerCertErrors.Checked = CONFIG.IgnoreServerCertErrors;
                this.cbDecryptHTTPS.Enabled = this.cbCaptureCONNECT.Checked;
                this.btnExportRoot.Visible = this.lblSkipDecryption.Visible = this.txtSkipDecryption.Visible = this.cbxDecryptList.Visible = this.cbIgnoreServerCertErrors.Visible = this.cbDecryptHTTPS.Checked;
                this.cbUseSmartScroll.Checked = CONFIG.bSmartScroll;
                this.cbStreamVideo.Checked = CONFIG.bStreamAudioVideo;
                this.cbMapSocketToProcess.Checked = CONFIG.bMapSocketToProcess;
                this.cbReuseServerSockets.Checked = CONFIG.bReuseServerSockets;
                this.cbReuseClientSockets.Checked = CONFIG.bReuseClientSockets;
                this.cbReportHTTPErrors.Checked = CONFIG.bReportHTTPErrors;
                this.txtScriptReferences.Text = CONFIG.m_sAdditionalScriptReferences;
                this.txtListenPort.Text = CONFIG.ListenPort.ToString();
                this.txtListenPort.Enabled = !CONFIG.bUsingPortOverride;
                this.txtFiddlerBypass.Text = CONFIG.sHostsThatBypassFiddler;
                this.cbUseGateway.Checked = CONFIG.bForwardToGateway;
                this.cbHookAllConnections.Checked = CONFIG.bHookAllConnections;
                this.btnSetBGColor.BackColor = CONFIG.colorDisabledEdit;
                this.btnSetBGColor.ForeColor = Utilities.GetContrastingTextColor(CONFIG.colorDisabledEdit);
                this.cbAlwaysShowTrayIcon.Checked = CONFIG.bAlwaysShowTrayIcon;
                this.cbxFontSize.Text = CONFIG.flFontSize.ToString("##.##");
                this.txtHotkey.Text = string.Empty + ((char) CONFIG.iHotkey);
                switch (CONFIG.iHotkeyMod)
                {
                    case 6:
                        this.cbxHotkeyMod.SelectedIndex = 2;
                        break;

                    case 8:
                        this.cbxHotkeyMod.SelectedIndex = 0;
                        break;

                    default:
                        this.cbxHotkeyMod.SelectedIndex = 1;
                        break;
                }
                this.lnkShowGatewayInfo.Enabled = FiddlerApplication.oProxy.piPrior != null;
                this.txtExtensions.Text = "None loaded.";
                if ((FiddlerApplication.oExtensions != null) && (FiddlerApplication.oExtensions.Extensions.Count > 0))
                {
                    StringBuilder builder = new StringBuilder();
                    foreach (IFiddlerExtension extension in FiddlerApplication.oExtensions.Extensions.Values)
                    {
                        FileVersionInfo versionInfo = FileVersionInfo.GetVersionInfo(extension.GetType().Assembly.Location);
                        string str = string.Format("(v{0}.{1}.{2}.{3})\tfrom {4}", new object[] { versionInfo.FileMajorPart, versionInfo.FileMinorPart, versionInfo.FileBuildPart, versionInfo.FilePrivatePart, Utilities.CollapsePath(extension.GetType().Assembly.Location) });
                        builder.AppendFormat("{0} {1}\r\n", extension.ToString(), str);
                    }
                    this.txtExtensions.Text = builder.ToString();
                }
                if (FiddlerApplication.oProxy.oAllConnectoids != null)
                {
                    foreach (WinINETConnectoid connectoid in FiddlerApplication.oProxy.oAllConnectoids._oConnectoids.Values)
                    {
                        this.clbConnections.Items.Add(connectoid.sConnectionName, connectoid.bIsHooked);
                    }
                }
                else
                {
                    this.clbConnections.Visible = false;
                }
            }
            catch (Exception exception)
            {
                FiddlerApplication.ReportException(exception, "LoadSettings Failure");
            }
        }

        private void InitializeComponent()
        {
            this.components = new Container();
            ComponentResourceManager manager = new ComponentResourceManager(typeof(frmOptions));
            this.cbAutoCheckForUpdates = new CheckBox();
            this.cbAutoReloadScript = new CheckBox();
            this.btnApply = new Button();
            this.btnCancel = new Button();
            this.txtScriptReferences = new TextBox();
            this.label2 = new Label();
            this.cbEnableIPv6 = new CheckBox();
            this.gbScript = new GroupBox();
            this.lblAssemblyReferences = new Label();
            this.cbReportHTTPErrors = new CheckBox();
            this.txtHotkey = new TextBox();
            this.cbxHotkeyMod = new ComboBox();
            this.lblHotkey = new Label();
            this.dlgChooseEditor = new OpenFileDialog();
            this.toolTip1 = new ToolTip(this.components);
            this.cbIgnoreServerCertErrors = new CheckBox();
            this.cbDecryptHTTPS = new CheckBox();
            this.cbCaptureCONNECT = new CheckBox();
            this.cbAttachOnStartup = new CheckBox();
            this.cbUseGateway = new CheckBox();
            this.cbxFontSize = new ComboBox();
            this.cbHideOnMinimize = new CheckBox();
            this.cbMapSocketToProcess = new CheckBox();
            this.cbUseSmartScroll = new CheckBox();
            this.cbStreamVideo = new CheckBox();
            this.txtListenPort = new TextBox();
            this.cbResetSessionIDOnListClear = new CheckBox();
            this.txtFiddlerBypass = new TextBox();
            this.lblFiddlerBypass = new Label();
            this.cbHookAllConnections = new CheckBox();
            this.cbAlwaysShowTrayIcon = new CheckBox();
            this.lnkCopyPACURL = new LinkLabel();
            this.cbReuseClientSockets = new CheckBox();
            this.cbReuseServerSockets = new CheckBox();
            this.cbAllowRemote = new CheckBox();
            this.cbHookWithPAC = new CheckBox();
            this.btnCleanCertificateStore = new Button();
            this.btnExportRoot = new Button();
            this.txtSkipDecryption = new TextBox();
            this.cbFIP = new CheckBox();
            this.btnSetBGColor = new Button();
            this.cbxDecryptList = new ComboBox();
            this.cbCaptureFTP = new CheckBox();
            this.txtScriptEditor = new TextBox();
            this.btnChooseFSE = new Button();
            this.txtCompareTool = new TextBox();
            this.btnChooseCompare = new Button();
            this.txtTextEditor = new TextBox();
            this.btnChooseTextEditor = new Button();
            this.tabsOptions = new TabControl();
            this.tabGeneral = new TabPage();
            this.tabHTTPS = new TabPage();
            this.lblSkipDecryption = new Label();
            this.lblHTTPSDescription = new Label();
            this.lnkHTTPSIntercept = new LinkLabel();
            this.tabExtensions = new TabPage();
            this.gbAutoFiddles = new GroupBox();
            this.lnkFindExtensions = new LinkLabel();
            this.txtExtensions = new RichTextBox();
            this.tabConnections = new TabPage();
            this.lnkShowGatewayInfo = new LinkLabel();
            this.label3 = new Label();
            this.lnkHookup = new LinkLabel();
            this.lblExplainConn = new Label();
            this.clbConnections = new CheckedListBox();
            this.lblConns = new Label();
            this.tabAppearance = new TabPage();
            this.lblFontSize = new Label();
            this.tabTools = new TabPage();
            this.lblToolsCompare = new Label();
            this.pnlOptionsFooter = new Panel();
            this.lnkOptionsHelp = new LinkLabel();
            this.lblRequiresRestart = new Label();
            this.dlgPickColor = new ColorDialog();
            Label label = new Label();
            Label label2 = new Label();
            this.gbScript.SuspendLayout();
            this.tabsOptions.SuspendLayout();
            this.tabGeneral.SuspendLayout();
            this.tabHTTPS.SuspendLayout();
            this.tabExtensions.SuspendLayout();
            this.gbAutoFiddles.SuspendLayout();
            this.tabConnections.SuspendLayout();
            this.tabAppearance.SuspendLayout();
            this.tabTools.SuspendLayout();
            this.pnlOptionsFooter.SuspendLayout();
            base.SuspendLayout();
            label.Location = new Point(15, 40);
            label.Name = "lblToolsFSE";
            label.Size = new Size(0x72, 0x12);
            label.TabIndex = 3;
            label.Text = "&FiddlerScript Editor:";
            label.TextAlign = ContentAlignment.MiddleRight;
            label2.Location = new Point(13, 13);
            label2.Name = "lblToolsTextEditor";
            label2.Size = new Size(0x72, 0x12);
            label2.TabIndex = 0;
            label2.Text = "&Text Editor:";
            label2.TextAlign = ContentAlignment.MiddleRight;
            this.cbAutoCheckForUpdates.Location = new Point(8, 0x11);
            this.cbAutoCheckForUpdates.Name = "cbAutoCheckForUpdates";
            this.cbAutoCheckForUpdates.Size = new Size(0xf1, 0x10);
            this.cbAutoCheckForUpdates.TabIndex = 0;
            this.cbAutoCheckForUpdates.Text = "Check for &updates on startup";
            this.toolTip1.SetToolTip(this.cbAutoCheckForUpdates, "Fiddler will hit a webservice at www.fiddler2.com to check for new versions.");
            this.cbAutoReloadScript.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
            this.cbAutoReloadScript.Location = new Point(10, 20);
            this.cbAutoReloadScript.Name = "cbAutoReloadScript";
            this.cbAutoReloadScript.Size = new Size(0x1fd, 0x17);
            this.cbAutoReloadScript.TabIndex = 0;
            this.cbAutoReloadScript.Text = "Automatically reload &script when changed";
            this.toolTip1.SetToolTip(this.cbAutoReloadScript, "Fiddler will automatically reload the script when it detects that the script file has been changed.");
            this.btnApply.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
            this.btnApply.Location = new Point(0x174, 8);
            this.btnApply.Name = "btnApply";
            this.btnApply.Size = new Size(0x4e, 0x17);
            this.btnApply.TabIndex = 0;
            this.btnApply.Text = "&OK";
            this.btnApply.Click += new EventHandler(this.btnApply_Click);
            this.btnCancel.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
            this.btnCancel.DialogResult = DialogResult.Cancel;
            this.btnCancel.Location = new Point(0x1ca, 8);
            this.btnCancel.Name = "btnCancel";
            this.btnCancel.Size = new Size(0x4e, 0x17);
            this.btnCancel.TabIndex = 1;
            this.btnCancel.Text = "&Cancel";
            this.btnCancel.Click += new EventHandler(this.btnCancel_Click);
            this.txtScriptReferences.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
            this.txtScriptReferences.Location = new Point(0x63, 0x2e);
            this.txtScriptReferences.Name = "txtScriptReferences";
            this.txtScriptReferences.Size = new Size(0x1a6, 0x15);
            this.txtScriptReferences.TabIndex = 5;
            this.toolTip1.SetToolTip(this.txtScriptReferences, "List any additional assemblies to reference within FiddlerScript.");
            this.label2.Location = new Point(6, 0x2e);
            this.label2.Name = "label2";
            this.label2.Size = new Size(0x57, 0x12);
            this.label2.TabIndex = 4;
            this.label2.Text = "Re&ferences:";
            this.label2.TextAlign = ContentAlignment.MiddleRight;
            this.cbEnableIPv6.Location = new Point(8, 0x3d);
            this.cbEnableIPv6.Name = "cbEnableIPv6";
            this.cbEnableIPv6.Size = new Size(0x1fc, 0x10);
            this.cbEnableIPv6.TabIndex = 3;
            this.cbEnableIPv6.Text = "Enable IPv&6 (if available)";
            this.toolTip1.SetToolTip(this.cbEnableIPv6, "Bind Fiddler's listener to the IPv6 adapter on the local host.");
            this.gbScript.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
            this.gbScript.Controls.Add(this.txtScriptReferences);
            this.gbScript.Controls.Add(this.label2);
            this.gbScript.Controls.Add(this.cbAutoReloadScript);
            this.gbScript.Controls.Add(this.lblAssemblyReferences);
            this.gbScript.Location = new Point(3, 8);
            this.gbScript.Name = "gbScript";
            this.gbScript.Size = new Size(0x20f, 0x5c);
            this.gbScript.TabIndex = 0;
            this.gbScript.TabStop = false;
            this.gbScript.Text = "Scripting";
            this.lblAssemblyReferences.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
            this.lblAssemblyReferences.ForeColor = SystemColors.ControlDarkDark;
            this.lblAssemblyReferences.Location = new Point(0x60, 70);
            this.lblAssemblyReferences.Name = "lblAssemblyReferences";
            this.lblAssemblyReferences.Size = new Size(0x1a7, 0x13);
            this.lblAssemblyReferences.TabIndex = 6;
            this.lblAssemblyReferences.Text = @"e.g. C:\lib\Utils.dll; c:\lib\myappname.exe";
            this.cbReportHTTPErrors.Location = new Point(8, 0x27);
            this.cbReportHTTPErrors.Name = "cbReportHTTPErrors";
            this.cbReportHTTPErrors.Size = new Size(0x1fc, 0x10);
            this.cbReportHTTPErrors.TabIndex = 2;
            this.cbReportHTTPErrors.Text = "Show a message when HTTP protocol &violations are encountered";
            this.toolTip1.SetToolTip(this.cbReportHTTPErrors, "Shows a popup warning when either a request or a response is illegal under the HTTP RFCs.");
            this.txtHotkey.CharacterCasing = CharacterCasing.Upper;
            this.txtHotkey.Location = new Point(0xff, 0x88);
            this.txtHotkey.MaxLength = 1;
            this.txtHotkey.Name = "txtHotkey";
            this.txtHotkey.Size = new Size(0x1a, 0x15);
            this.txtHotkey.TabIndex = 9;
            this.txtHotkey.Text = "F";
            this.cbxHotkeyMod.DropDownStyle = ComboBoxStyle.DropDownList;
            this.cbxHotkeyMod.Items.AddRange(new object[] { "WIN +", "CTRL + ALT +", "CTRL + SHIFT +" });
            this.cbxHotkeyMod.Location = new Point(0x89, 0x88);
            this.cbxHotkeyMod.Name = "cbxHotkeyMod";
            this.cbxHotkeyMod.Size = new Size(0x70, 0x15);
            this.cbxHotkeyMod.TabIndex = 8;
            this.lblHotkey.Location = new Point(0x11, 0x88);
            this.lblHotkey.Name = "lblHotkey";
            this.lblHotkey.Size = new Size(0x72, 0x12);
            this.lblHotkey.TabIndex = 7;
            this.lblHotkey.Text = "Systemwide &Hotkey:";
            this.lblHotkey.TextAlign = ContentAlignment.MiddleRight;
            this.dlgChooseEditor.DefaultExt = "exe";
            this.dlgChooseEditor.Filter = "Executables (*.exe)|*.exe|All Files (*.*)|*.*";
            this.dlgChooseEditor.Title = "Select Tool";
            this.cbIgnoreServerCertErrors.Location = new Point(0x18, 0x76);
            this.cbIgnoreServerCertErrors.Name = "cbIgnoreServerCertErrors";
            this.cbIgnoreServerCertErrors.Size = new Size(0xb8, 20);
            this.cbIgnoreServerCertErrors.TabIndex = 4;
            this.cbIgnoreServerCertErrors.Text = "&Ignore server certificate errors";
            this.toolTip1.SetToolTip(this.cbIgnoreServerCertErrors, "Check to suppress the warning shown when a remote server presents an invalid certificate.");
            this.cbDecryptHTTPS.Location = new Point(0x18, 0x41);
            this.cbDecryptHTTPS.Name = "cbDecryptHTTPS";
            this.cbDecryptHTTPS.Size = new Size(0x8b, 20);
            this.cbDecryptHTTPS.TabIndex = 2;
            this.cbDecryptHTTPS.Text = "D&ecrypt HTTPS traffic";
            this.toolTip1.SetToolTip(this.cbDecryptHTTPS, "Show HTTPS traffic in plaintext (see 'Learn more' link for details)");
            this.cbDecryptHTTPS.CheckedChanged += new EventHandler(this.cbDecryptHTTPS_CheckedChanged);
            this.cbDecryptHTTPS.Click += new EventHandler(this.cbDecryptHTTPS_Click);
            this.cbCaptureCONNECT.Location = new Point(9, 0x27);
            this.cbCaptureCONNECT.Name = "cbCaptureCONNECT";
            this.cbCaptureCONNECT.Size = new Size(200, 20);
            this.cbCaptureCONNECT.TabIndex = 1;
            this.cbCaptureCONNECT.Text = "Capture &HTTPS CONNECTs";
            this.toolTip1.SetToolTip(this.cbCaptureCONNECT, "Check to intercept HTTPS and WebSocket Tunneling requests.");
            this.cbCaptureCONNECT.CheckedChanged += new EventHandler(this.cbCaptureCONNECT_CheckedChanged);
            this.cbAttachOnStartup.Location = new Point(0xfb, 0x45);
            this.cbAttachOnStartup.Name = "cbAttachOnStartup";
            this.cbAttachOnStartup.Size = new Size(240, 20);
            this.cbAttachOnStartup.TabIndex = 11;
            this.cbAttachOnStartup.Text = "&Act as system proxy on startup";
            this.toolTip1.SetToolTip(this.cbAttachOnStartup, "When checked, Fiddler will automatically attach to WinINET/IE on startup.");
            this.cbUseGateway.Location = new Point(0x10, 0xd0);
            this.cbUseGateway.Name = "cbUseGateway";
            this.cbUseGateway.Size = new Size(0xc2, 20);
            this.cbUseGateway.TabIndex = 8;
            this.cbUseGateway.Text = "Chain to &upstream gateway proxy";
            this.toolTip1.SetToolTip(this.cbUseGateway, "Check to forward traffic from Fiddler through an upstream proxy.");
            this.cbxFontSize.DropDownStyle = ComboBoxStyle.DropDownList;
            this.cbxFontSize.Items.AddRange(new object[] { "8.25", "10", "11", "12", "14", "16", "18" });
            this.cbxFontSize.Location = new Point(0x44, 0x10);
            this.cbxFontSize.Name = "cbxFontSize";
            this.cbxFontSize.Size = new Size(60, 0x15);
            this.cbxFontSize.TabIndex = 1;
            this.toolTip1.SetToolTip(this.cbxFontSize, "Font size used in Fiddler. (Requires restart for full effect)");
            this.cbHideOnMinimize.Location = new Point(8, 0x2e);
            this.cbHideOnMinimize.Name = "cbHideOnMinimize";
            this.cbHideOnMinimize.Size = new Size(0x206, 0x10);
            this.cbHideOnMinimize.TabIndex = 3;
            this.cbHideOnMinimize.Text = "&Hide Fiddler when minimized";
            this.toolTip1.SetToolTip(this.cbHideOnMinimize, "Hides Fiddler in the System tray when minimized.");
            this.cbMapSocketToProcess.Location = new Point(8, 0x53);
            this.cbMapSocketToProcess.Name = "cbMapSocketToProcess";
            this.cbMapSocketToProcess.Size = new Size(0x1fc, 0x10);
            this.cbMapSocketToProcess.TabIndex = 4;
            this.cbMapSocketToProcess.Text = "&Map requests to originating application";
            this.toolTip1.SetToolTip(this.cbMapSocketToProcess, "Fiddler will attempt to determine which local process created the Web Session.");
            this.cbUseSmartScroll.Location = new Point(8, 0x5b);
            this.cbUseSmartScroll.Name = "cbUseSmartScroll";
            this.cbUseSmartScroll.Size = new Size(0x206, 0x10);
            this.cbUseSmartScroll.TabIndex = 5;
            this.cbUseSmartScroll.Text = "Use &SmartScroll in Session List";
            this.toolTip1.SetToolTip(this.cbUseSmartScroll, "Disables session list auto-scrolling when session list is scrolled.");
            this.cbStreamVideo.Location = new Point(8, 0x69);
            this.cbStreamVideo.Name = "cbStreamVideo";
            this.cbStreamVideo.Size = new Size(0x1fc, 0x10);
            this.cbStreamVideo.TabIndex = 6;
            this.cbStreamVideo.Text = "Automatically &stream audio && video";
            this.toolTip1.SetToolTip(this.cbStreamVideo, "Allow audio and video to stream automatically.");
            this.txtListenPort.Location = new Point(0x90, 0x33);
            this.txtListenPort.MaxLength = 5;
            this.txtListenPort.Name = "txtListenPort";
            this.txtListenPort.Size = new Size(0x42, 0x15);
            this.txtListenPort.TabIndex = 2;
            this.toolTip1.SetToolTip(this.txtListenPort, "Select the local port on which Fiddler should accept connections.");
            this.cbResetSessionIDOnListClear.Location = new Point(8, 0x71);
            this.cbResetSessionIDOnListClear.Name = "cbResetSessionIDOnListClear";
            this.cbResetSessionIDOnListClear.Size = new Size(0x206, 0x10);
            this.cbResetSessionIDOnListClear.TabIndex = 6;
            this.cbResetSessionIDOnListClear.Text = "&Reset Session ID counter on CTRL+X";
            this.toolTip1.SetToolTip(this.cbResetSessionIDOnListClear, "When CTRL+X is used to clear the session list, the session identifier counter restarts from 0.");
            this.txtFiddlerBypass.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
            this.txtFiddlerBypass.Location = new Point(0xfb, 0xd0);
            this.txtFiddlerBypass.Multiline = true;
            this.txtFiddlerBypass.Name = "txtFiddlerBypass";
            this.txtFiddlerBypass.ScrollBars = ScrollBars.Both;
            this.txtFiddlerBypass.Size = new Size(270, 0x3d);
            this.txtFiddlerBypass.TabIndex = 0x10;
            this.toolTip1.SetToolTip(this.txtFiddlerBypass, "Internet Explorer-style Proxy Bypass list. Semicolon-delimited. Requires restart. E.g.  *example.*:8081;https://*.fiddler2.com");
            this.lblFiddlerBypass.AutoSize = true;
            this.lblFiddlerBypass.Location = new Point(0xf8, 190);
            this.lblFiddlerBypass.Name = "lblFiddlerBypass";
            this.lblFiddlerBypass.Size = new Size(0xc4, 13);
            this.lblFiddlerBypass.TabIndex = 15;
            this.lblFiddlerBypass.Text = "Bypass F&iddler for URLs that start with:";
            this.toolTip1.SetToolTip(this.lblFiddlerBypass, "Browser-style Proxy Bypass list. Semicolon-delimited. Requires restart. E.g.  *example.*:8081;https://*.fiddler2.com");
            this.cbHookAllConnections.Location = new Point(0xfb, 0x5d);
            this.cbHookAllConnections.Name = "cbHookAllConnections";
            this.cbHookAllConnections.Size = new Size(160, 20);
            this.cbHookAllConnections.TabIndex = 12;
            this.cbHookAllConnections.Text = "&Monitor all connections";
            this.toolTip1.SetToolTip(this.cbHookAllConnections, "When checked, Fiddler will attach to all WinINET connections.");
            this.cbAlwaysShowTrayIcon.Location = new Point(8, 0x44);
            this.cbAlwaysShowTrayIcon.Name = "cbAlwaysShowTrayIcon";
            this.cbAlwaysShowTrayIcon.Size = new Size(0x206, 0x10);
            this.cbAlwaysShowTrayIcon.TabIndex = 4;
            this.cbAlwaysShowTrayIcon.Text = "&Always show tray icon";
            this.toolTip1.SetToolTip(this.cbAlwaysShowTrayIcon, "Show Fiddler in the System tray at all times.");
            this.cbAlwaysShowTrayIcon.CheckedChanged += new EventHandler(this.cbAlwaysShowTrayIcon_CheckedChanged);
            this.lnkCopyPACURL.AutoSize = true;
            this.lnkCopyPACURL.LinkBehavior = LinkBehavior.HoverUnderline;
            this.lnkCopyPACURL.Location = new Point(15, 0x4c);
            this.lnkCopyPACURL.Name = "lnkCopyPACURL";
            this.lnkCopyPACURL.Size = new Size(0xc3, 13);
            this.lnkCopyPACURL.TabIndex = 3;
            this.lnkCopyPACURL.TabStop = true;
            this.lnkCopyPACURL.Text = "Copy Browser Proxy Configuration URL";
            this.toolTip1.SetToolTip(this.lnkCopyPACURL, "When a browser (e.g. Firefox) is configured to point at this URL, it will use Fiddler when Fiddler is running, and go direct otherwise.");
            this.lnkCopyPACURL.LinkClicked += new LinkLabelLinkClickedEventHandler(this.lnkCopyPACURL_LinkClicked);
            this.cbReuseClientSockets.Location = new Point(0x10, 0xa2);
            this.cbReuseClientSockets.Name = "cbReuseClientSockets";
            this.cbReuseClientSockets.Size = new Size(0xad, 20);
            this.cbReuseClientSockets.TabIndex = 6;
            this.cbReuseClientSockets.Text = "Reuse client co&nnections";
            this.toolTip1.SetToolTip(this.cbReuseClientSockets, "Allow more than one request from a given client socket.");
            this.cbReuseServerSockets.Location = new Point(0x10, 0xb9);
            this.cbReuseServerSockets.Name = "cbReuseServerSockets";
            this.cbReuseServerSockets.Size = new Size(0xb5, 20);
            this.cbReuseServerSockets.TabIndex = 7;
            this.cbReuseServerSockets.Text = "&Reuse connections to servers";
            this.toolTip1.SetToolTip(this.cbReuseServerSockets, "Enable socket reuse when connecting to remote HTTP servers.");
            this.cbAllowRemote.Location = new Point(0x10, 0x89);
            this.cbAllowRemote.Name = "cbAllowRemote";
            this.cbAllowRemote.Size = new Size(210, 0x16);
            this.cbAllowRemote.TabIndex = 5;
            this.cbAllowRemote.Text = "Allo&w remote computers to connect";
            this.toolTip1.SetToolTip(this.cbAllowRemote, "Check to permit remote computers to route traffic through Fiddler.");
            this.cbAllowRemote.Click += new EventHandler(this.cbAllowRemote_Click);
            this.cbHookWithPAC.Location = new Point(0x19f, 0x5c);
            this.cbHookWithPAC.Name = "cbHookWithPAC";
            this.cbHookWithPAC.Size = new Size(0x6a, 0x16);
            this.cbHookWithPAC.TabIndex = 13;
            this.cbHookWithPAC.Text = "Use &PAC Script";
            this.toolTip1.SetToolTip(this.cbHookWithPAC, "Registers with WinINET as a ProxyAutoConfig script, allowing for simpler Localhost debugging.");
            this.btnCleanCertificateStore.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
            this.btnCleanCertificateStore.Location = new Point(0x127, 0xeb);
            this.btnCleanCertificateStore.Name = "btnCleanCertificateStore";
            this.btnCleanCertificateStore.Size = new Size(210, 0x17);
            this.btnCleanCertificateStore.TabIndex = 8;
            this.btnCleanCertificateStore.Text = "&Remove Interception Certificates";
            this.toolTip1.SetToolTip(this.btnCleanCertificateStore, "Removes all Fiddler-generated interception certificates from your certificate stores.");
            this.btnCleanCertificateStore.UseVisualStyleBackColor = true;
            this.btnCleanCertificateStore.Click += new EventHandler(this.btnCleanCertificateStore_Click);
            this.btnExportRoot.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
            this.btnExportRoot.Location = new Point(0x18, 0xeb);
            this.btnExportRoot.Name = "btnExportRoot";
            this.btnExportRoot.Size = new Size(210, 0x17);
            this.btnExportRoot.TabIndex = 7;
            this.btnExportRoot.Text = "E&xport Root Certificate to Desktop";
            this.toolTip1.SetToolTip(this.btnExportRoot, "Export's Fiddler's Root Certificate to the desktop. Useful for importing into some browsers.");
            this.btnExportRoot.UseVisualStyleBackColor = true;
            this.btnExportRoot.Click += new EventHandler(this.btnExportRoot_Click);
            this.txtSkipDecryption.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
            this.txtSkipDecryption.Location = new Point(0x18, 0xa9);
            this.txtSkipDecryption.Multiline = true;
            this.txtSkipDecryption.Name = "txtSkipDecryption";
            this.txtSkipDecryption.Size = new Size(0x1e1, 60);
            this.txtSkipDecryption.TabIndex = 6;
            this.toolTip1.SetToolTip(this.txtSkipDecryption, "Semi-colon delimited list of hostnames for which decryption should not occur.");
            this.cbFIP.Location = new Point(0xff, 0x10);
            this.cbFIP.Name = "cbFIP";
            this.cbFIP.Size = new Size(0x105, 0x10);
            this.cbFIP.TabIndex = 1;
            this.cbFIP.Text = "Participate in the &Fiddler Improvement Program";
            this.toolTip1.SetToolTip(this.cbFIP, "Fiddler will send anonymized usage data to a web service.");
            this.cbFIP.Click += new EventHandler(this.cbFIP_Click);
            this.btnSetBGColor.Location = new Point(0x9d, 14);
            this.btnSetBGColor.Name = "btnSetBGColor";
            this.btnSetBGColor.Size = new Size(0xb2, 0x17);
            this.btnSetBGColor.TabIndex = 2;
            this.btnSetBGColor.Text = "Set Readonly &Color";
            this.toolTip1.SetToolTip(this.btnSetBGColor, "Set the color for uneditable text fields.");
            this.btnSetBGColor.UseVisualStyleBackColor = true;
            this.btnSetBGColor.Click += new EventHandler(this.btnSetBGColor_Click);
            this.cbxDecryptList.DropDownStyle = ComboBoxStyle.DropDownList;
            this.cbxDecryptList.FormattingEnabled = true;
            this.cbxDecryptList.Items.AddRange(new object[] { "...from all processes", "...from browsers only", "...from non-browsers only", "...from remote clients only" });
            this.cbxDecryptList.Location = new Point(0x18, 0x5b);
            this.cbxDecryptList.Name = "cbxDecryptList";
            this.cbxDecryptList.Size = new Size(210, 0x15);
            this.cbxDecryptList.TabIndex = 3;
            this.toolTip1.SetToolTip(this.cbxDecryptList, "Select which process types will have HTTPS traffic decrypted.");
            this.cbCaptureFTP.Location = new Point(0x10, 0x70);
            this.cbCaptureFTP.Name = "cbCaptureFTP";
            this.cbCaptureFTP.Size = new Size(210, 0x16);
            this.cbCaptureFTP.TabIndex = 4;
            this.cbCaptureFTP.Text = "Captur&e FTP requests";
            this.toolTip1.SetToolTip(this.cbCaptureFTP, "Capture FTP requests");
            this.txtScriptEditor.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
            this.txtScriptEditor.Location = new Point(0x83, 0x27);
            this.txtScriptEditor.Name = "txtScriptEditor";
            this.txtScriptEditor.Size = new Size(0x16f, 0x15);
            this.txtScriptEditor.TabIndex = 4;
            this.toolTip1.SetToolTip(this.txtScriptEditor, "Choose the program you'd like to use to edit your FiddlerScript.\n A syntax-highlighting editor is available from Fiddler2.com.");
            this.btnChooseFSE.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            this.btnChooseFSE.Location = new Point(500, 40);
            this.btnChooseFSE.Name = "btnChooseFSE";
            this.btnChooseFSE.Size = new Size(0x1c, 20);
            this.btnChooseFSE.TabIndex = 5;
            this.btnChooseFSE.Text = "...";
            this.toolTip1.SetToolTip(this.btnChooseFSE, "Click to browse for an editor.");
            this.btnChooseFSE.Click += new EventHandler(this.btnChooseEditor_Click);
            this.txtCompareTool.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
            this.txtCompareTool.Location = new Point(0x83, 0x42);
            this.txtCompareTool.Name = "txtCompareTool";
            this.txtCompareTool.Size = new Size(0x16f, 0x15);
            this.txtCompareTool.TabIndex = 7;
            this.toolTip1.SetToolTip(this.txtCompareTool, "Choose the program you'd like to use to compare files (e.g. WinMerge, WinDiff, Odd, etc).");
            this.btnChooseCompare.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            this.btnChooseCompare.Location = new Point(500, 0x43);
            this.btnChooseCompare.Name = "btnChooseCompare";
            this.btnChooseCompare.Size = new Size(0x1c, 20);
            this.btnChooseCompare.TabIndex = 8;
            this.btnChooseCompare.Text = "...";
            this.toolTip1.SetToolTip(this.btnChooseCompare, "Click to browse for a tool.");
            this.btnChooseCompare.Click += new EventHandler(this.btnChooseCompare_Click);
            this.txtTextEditor.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
            this.txtTextEditor.Location = new Point(0x83, 11);
            this.txtTextEditor.Name = "txtTextEditor";
            this.txtTextEditor.Size = new Size(0x16f, 0x15);
            this.txtTextEditor.TabIndex = 1;
            this.toolTip1.SetToolTip(this.txtTextEditor, "Choose the Text Editor you'd like to use (e.g. NotePad++, EditPadPro, etc).");
            this.btnChooseTextEditor.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            this.btnChooseTextEditor.Location = new Point(500, 11);
            this.btnChooseTextEditor.Name = "btnChooseTextEditor";
            this.btnChooseTextEditor.Size = new Size(0x1c, 20);
            this.btnChooseTextEditor.TabIndex = 2;
            this.btnChooseTextEditor.Text = "...";
            this.toolTip1.SetToolTip(this.btnChooseTextEditor, "Click to browse for an editor.");
            this.btnChooseTextEditor.Click += new EventHandler(this.btnChooseTextEditor_Click);
            this.tabsOptions.Controls.Add(this.tabGeneral);
            this.tabsOptions.Controls.Add(this.tabHTTPS);
            this.tabsOptions.Controls.Add(this.tabExtensions);
            this.tabsOptions.Controls.Add(this.tabConnections);
            this.tabsOptions.Controls.Add(this.tabAppearance);
            this.tabsOptions.Controls.Add(this.tabTools);
            this.tabsOptions.Dock = DockStyle.Fill;
            this.tabsOptions.Location = new Point(0, 0);
            this.tabsOptions.Name = "tabsOptions";
            this.tabsOptions.SelectedIndex = 0;
            this.tabsOptions.Size = new Size(0x21e, 0x12d);
            this.tabsOptions.TabIndex = 0;
            this.tabsOptions.HelpRequested += new HelpEventHandler(this.tabsOptions_HelpRequested);
            this.tabGeneral.BackColor = SystemColors.Window;
            this.tabGeneral.Controls.Add(this.cbFIP);
            this.tabGeneral.Controls.Add(this.cbStreamVideo);
            this.tabGeneral.Controls.Add(this.cbMapSocketToProcess);
            this.tabGeneral.Controls.Add(this.cbEnableIPv6);
            this.tabGeneral.Controls.Add(this.cbxHotkeyMod);
            this.tabGeneral.Controls.Add(this.lblHotkey);
            this.tabGeneral.Controls.Add(this.cbAutoCheckForUpdates);
            this.tabGeneral.Controls.Add(this.cbReportHTTPErrors);
            this.tabGeneral.Controls.Add(this.txtHotkey);
            this.tabGeneral.Location = new Point(4, 0x16);
            this.tabGeneral.Name = "tabGeneral";
            this.tabGeneral.Size = new Size(0x216, 0x113);
            this.tabGeneral.TabIndex = 0;
            this.tabGeneral.Text = "General";
            this.tabHTTPS.BackColor = SystemColors.Window;
            this.tabHTTPS.Controls.Add(this.txtSkipDecryption);
            this.tabHTTPS.Controls.Add(this.cbxDecryptList);
            this.tabHTTPS.Controls.Add(this.lblSkipDecryption);
            this.tabHTTPS.Controls.Add(this.btnExportRoot);
            this.tabHTTPS.Controls.Add(this.btnCleanCertificateStore);
            this.tabHTTPS.Controls.Add(this.lblHTTPSDescription);
            this.tabHTTPS.Controls.Add(this.lnkHTTPSIntercept);
            this.tabHTTPS.Controls.Add(this.cbIgnoreServerCertErrors);
            this.tabHTTPS.Controls.Add(this.cbDecryptHTTPS);
            this.tabHTTPS.Controls.Add(this.cbCaptureCONNECT);
            this.tabHTTPS.Location = new Point(4, 0x16);
            this.tabHTTPS.Name = "tabHTTPS";
            this.tabHTTPS.Padding = new Padding(3);
            this.tabHTTPS.Size = new Size(0x216, 0x113);
            this.tabHTTPS.TabIndex = 3;
            this.tabHTTPS.Text = "HTTPS";
            this.lblSkipDecryption.AutoSize = true;
            this.lblSkipDecryption.Location = new Point(0x15, 0x99);
            this.lblSkipDecryption.Name = "lblSkipDecryption";
            this.lblSkipDecryption.Size = new Size(0xc2, 13);
            this.lblSkipDecryption.TabIndex = 5;
            this.lblSkipDecryption.Text = "&Skip decryption for the following hosts:";
            this.lblHTTPSDescription.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
            this.lblHTTPSDescription.Location = new Point(6, 3);
            this.lblHTTPSDescription.Name = "lblHTTPSDescription";
            this.lblHTTPSDescription.Size = new Size(520, 0x15);
            this.lblHTTPSDescription.TabIndex = 0;
            this.lblHTTPSDescription.Text = "Fiddler is able to decrypt HTTPS sessions by re-signing traffic using a self-generated certificate.";
            this.lblHTTPSDescription.TextAlign = ContentAlignment.MiddleLeft;
            this.lnkHTTPSIntercept.AutoSize = true;
            this.lnkHTTPSIntercept.LinkBehavior = LinkBehavior.HoverUnderline;
            this.lnkHTTPSIntercept.Location = new Point(0xf3, 0x44);
            this.lnkHTTPSIntercept.Name = "lnkHTTPSIntercept";
            this.lnkHTTPSIntercept.Size = new Size(0x106, 13);
            this.lnkHTTPSIntercept.TabIndex = 9;
            this.lnkHTTPSIntercept.TabStop = true;
            this.lnkHTTPSIntercept.Text = "Learn more about decryption and certificate errors...";
            this.lnkHTTPSIntercept.LinkClicked += new LinkLabelLinkClickedEventHandler(this.lnkHTTPSIntercept_LinkClicked);
            this.tabExtensions.BackColor = SystemColors.Window;
            this.tabExtensions.Controls.Add(this.gbAutoFiddles);
            this.tabExtensions.Controls.Add(this.gbScript);
            this.tabExtensions.Location = new Point(4, 0x16);
            this.tabExtensions.Name = "tabExtensions";
            this.tabExtensions.Size = new Size(0x216, 0x113);
            this.tabExtensions.TabIndex = 1;
            this.tabExtensions.Text = "Extensions";
            this.gbAutoFiddles.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
            this.gbAutoFiddles.Controls.Add(this.lnkFindExtensions);
            this.gbAutoFiddles.Controls.Add(this.txtExtensions);
            this.gbAutoFiddles.Location = new Point(3, 0x6a);
            this.gbAutoFiddles.Name = "gbAutoFiddles";
            this.gbAutoFiddles.Size = new Size(0x211, 0xa6);
            this.gbAutoFiddles.TabIndex = 1;
            this.gbAutoFiddles.TabStop = false;
            this.gbAutoFiddles.Text = "Extensions";
            this.lnkFindExtensions.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
            this.lnkFindExtensions.AutoSize = true;
            this.lnkFindExtensions.LinkBehavior = LinkBehavior.HoverUnderline;
            this.lnkFindExtensions.Location = new Point(0x192, 0x90);
            this.lnkFindExtensions.Name = "lnkFindExtensions";
            this.lnkFindExtensions.Size = new Size(0x79, 13);
            this.lnkFindExtensions.TabIndex = 1;
            this.lnkFindExtensions.TabStop = true;
            this.lnkFindExtensions.Text = "Find more extensions...";
            this.lnkFindExtensions.TextAlign = ContentAlignment.TopRight;
            this.lnkFindExtensions.LinkClicked += new LinkLabelLinkClickedEventHandler(this.lnkFindExtensions_LinkClicked);
            this.txtExtensions.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
            this.txtExtensions.BorderStyle = BorderStyle.FixedSingle;
            this.txtExtensions.Font = new Font("Tahoma", 6.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.txtExtensions.Location = new Point(5, 14);
            this.txtExtensions.Name = "txtExtensions";
            this.txtExtensions.ReadOnly = true;
            this.txtExtensions.Size = new Size(0x206, 130);
            this.txtExtensions.TabIndex = 0;
            this.txtExtensions.Text = "";
            this.txtExtensions.WordWrap = false;
            this.tabConnections.BackColor = SystemColors.Window;
            this.tabConnections.Controls.Add(this.cbCaptureFTP);
            this.tabConnections.Controls.Add(this.cbHookWithPAC);
            this.tabConnections.Controls.Add(this.cbAllowRemote);
            this.tabConnections.Controls.Add(this.cbReuseClientSockets);
            this.tabConnections.Controls.Add(this.cbReuseServerSockets);
            this.tabConnections.Controls.Add(this.lnkCopyPACURL);
            this.tabConnections.Controls.Add(this.cbHookAllConnections);
            this.tabConnections.Controls.Add(this.txtFiddlerBypass);
            this.tabConnections.Controls.Add(this.lblFiddlerBypass);
            this.tabConnections.Controls.Add(this.lnkShowGatewayInfo);
            this.tabConnections.Controls.Add(this.txtListenPort);
            this.tabConnections.Controls.Add(this.label3);
            this.tabConnections.Controls.Add(this.cbAttachOnStartup);
            this.tabConnections.Controls.Add(this.cbUseGateway);
            this.tabConnections.Controls.Add(this.lnkHookup);
            this.tabConnections.Controls.Add(this.lblExplainConn);
            this.tabConnections.Controls.Add(this.clbConnections);
            this.tabConnections.Controls.Add(this.lblConns);
            this.tabConnections.Location = new Point(4, 0x16);
            this.tabConnections.Name = "tabConnections";
            this.tabConnections.Padding = new Padding(3);
            this.tabConnections.Size = new Size(0x216, 0x113);
            this.tabConnections.TabIndex = 2;
            this.tabConnections.Text = "Connections";
            this.lnkShowGatewayInfo.AutoSize = true;
            this.lnkShowGatewayInfo.LinkBehavior = LinkBehavior.HoverUnderline;
            this.lnkShowGatewayInfo.Location = new Point(0x24, 0xe7);
            this.lnkShowGatewayInfo.Name = "lnkShowGatewayInfo";
            this.lnkShowGatewayInfo.Size = new Size(0x66, 13);
            this.lnkShowGatewayInfo.TabIndex = 9;
            this.lnkShowGatewayInfo.TabStop = true;
            this.lnkShowGatewayInfo.Text = "Show Gateway Info";
            this.lnkShowGatewayInfo.LinkClicked += new LinkLabelLinkClickedEventHandler(this.lnkShowGatewayInfo_LinkClicked);
            this.label3.Location = new Point(13, 0x36);
            this.label3.Name = "label3";
            this.label3.Size = new Size(0x7d, 14);
            this.label3.TabIndex = 1;
            this.label3.Text = "Fiddler &listens on port:";
            this.label3.TextAlign = ContentAlignment.MiddleRight;
            this.lnkHookup.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            this.lnkHookup.LinkBehavior = LinkBehavior.HoverUnderline;
            this.lnkHookup.Location = new Point(0x1b2, 0x20);
            this.lnkHookup.Name = "lnkHookup";
            this.lnkHookup.Size = new Size(0x62, 0x10);
            this.lnkHookup.TabIndex = 0x11;
            this.lnkHookup.TabStop = true;
            this.lnkHookup.Text = "Learn more...";
            this.lnkHookup.TextAlign = ContentAlignment.TopRight;
            this.lnkHookup.LinkClicked += new LinkLabelLinkClickedEventHandler(this.lnkHookup_LinkClicked);
            this.lblExplainConn.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
            this.lblExplainConn.Location = new Point(3, 3);
            this.lblExplainConn.Name = "lblExplainConn";
            this.lblExplainConn.Size = new Size(520, 0x1d);
            this.lblExplainConn.TabIndex = 0;
            this.lblExplainConn.Text = "Fiddler can debug traffic from any application that accepts a HTTP Proxy. All WinINET traffic is routed through Fiddler when \"File > Capture Traffic\" is checked.";
            this.lblExplainConn.TextAlign = ContentAlignment.MiddleLeft;
            this.clbConnections.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
            this.clbConnections.CheckOnClick = true;
            this.clbConnections.Enabled = false;
            this.clbConnections.FormattingEnabled = true;
            this.clbConnections.Location = new Point(0xfb, 0x77);
            this.clbConnections.Name = "clbConnections";
            this.clbConnections.Size = new Size(270, 0x44);
            this.clbConnections.TabIndex = 14;
            this.lblConns.AutoSize = true;
            this.lblConns.BackColor = Color.Transparent;
            this.lblConns.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.lblConns.Location = new Point(0xf8, 0x33);
            this.lblConns.Name = "lblConns";
            this.lblConns.Size = new Size(0x7d, 13);
            this.lblConns.TabIndex = 10;
            this.lblConns.Text = "WinINET Connections";
            this.tabAppearance.BackColor = SystemColors.Window;
            this.tabAppearance.Controls.Add(this.btnSetBGColor);
            this.tabAppearance.Controls.Add(this.cbAlwaysShowTrayIcon);
            this.tabAppearance.Controls.Add(this.cbResetSessionIDOnListClear);
            this.tabAppearance.Controls.Add(this.cbUseSmartScroll);
            this.tabAppearance.Controls.Add(this.cbxFontSize);
            this.tabAppearance.Controls.Add(this.cbHideOnMinimize);
            this.tabAppearance.Controls.Add(this.lblFontSize);
            this.tabAppearance.Location = new Point(4, 0x16);
            this.tabAppearance.Name = "tabAppearance";
            this.tabAppearance.Padding = new Padding(3);
            this.tabAppearance.Size = new Size(0x216, 0x113);
            this.tabAppearance.TabIndex = 4;
            this.tabAppearance.Text = "Appearance";
            this.lblFontSize.Location = new Point(6, 0x13);
            this.lblFontSize.Name = "lblFontSize";
            this.lblFontSize.Size = new Size(0x38, 0x12);
            this.lblFontSize.TabIndex = 0;
            this.lblFontSize.Text = "&Font size:";
            this.lblFontSize.TextAlign = ContentAlignment.MiddleRight;
            this.tabTools.Controls.Add(this.txtTextEditor);
            this.tabTools.Controls.Add(label2);
            this.tabTools.Controls.Add(this.btnChooseTextEditor);
            this.tabTools.Controls.Add(this.txtCompareTool);
            this.tabTools.Controls.Add(this.lblToolsCompare);
            this.tabTools.Controls.Add(this.btnChooseCompare);
            this.tabTools.Controls.Add(this.txtScriptEditor);
            this.tabTools.Controls.Add(label);
            this.tabTools.Controls.Add(this.btnChooseFSE);
            this.tabTools.Location = new Point(4, 0x16);
            this.tabTools.Name = "tabTools";
            this.tabTools.Padding = new Padding(3);
            this.tabTools.Size = new Size(0x216, 0x113);
            this.tabTools.TabIndex = 5;
            this.tabTools.Text = "Tools";
            this.tabTools.UseVisualStyleBackColor = true;
            this.lblToolsCompare.Location = new Point(15, 0x44);
            this.lblToolsCompare.Name = "lblToolsCompare";
            this.lblToolsCompare.Size = new Size(0x72, 0x12);
            this.lblToolsCompare.TabIndex = 6;
            this.lblToolsCompare.Text = "File &Diff Tool:";
            this.lblToolsCompare.TextAlign = ContentAlignment.MiddleRight;
            this.pnlOptionsFooter.Controls.Add(this.lnkOptionsHelp);
            this.pnlOptionsFooter.Controls.Add(this.btnCancel);
            this.pnlOptionsFooter.Controls.Add(this.btnApply);
            this.pnlOptionsFooter.Controls.Add(this.lblRequiresRestart);
            this.pnlOptionsFooter.Dock = DockStyle.Bottom;
            this.pnlOptionsFooter.Location = new Point(0, 0x12d);
            this.pnlOptionsFooter.Name = "pnlOptionsFooter";
            this.pnlOptionsFooter.Size = new Size(0x21e, 0x24);
            this.pnlOptionsFooter.TabIndex = 1;
            this.lnkOptionsHelp.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
            this.lnkOptionsHelp.LinkBehavior = LinkBehavior.HoverUnderline;
            this.lnkOptionsHelp.Location = new Point(3, 3);
            this.lnkOptionsHelp.Name = "lnkOptionsHelp";
            this.lnkOptionsHelp.Size = new Size(0x27, 0x21);
            this.lnkOptionsHelp.TabIndex = 3;
            this.lnkOptionsHelp.TabStop = true;
            this.lnkOptionsHelp.Text = "Help";
            this.lnkOptionsHelp.TextAlign = ContentAlignment.MiddleCenter;
            this.lnkOptionsHelp.LinkClicked += new LinkLabelLinkClickedEventHandler(this.lnkOptionsHelp_LinkClicked);
            this.lblRequiresRestart.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top;
            this.lblRequiresRestart.ForeColor = Color.DimGray;
            this.lblRequiresRestart.Location = new Point(0x3b, 3);
            this.lblRequiresRestart.Name = "lblRequiresRestart";
            this.lblRequiresRestart.Size = new Size(0x1d7, 0x21);
            this.lblRequiresRestart.TabIndex = 2;
            this.lblRequiresRestart.Text = "Note: Changes may not take effect until Fiddler is restarted.";
            this.lblRequiresRestart.TextAlign = ContentAlignment.MiddleLeft;
            this.AutoScaleBaseSize = new Size(5, 14);
            base.CancelButton = this.btnCancel;
            base.ClientSize = new Size(0x21e, 0x151);
            base.Controls.Add(this.tabsOptions);
            base.Controls.Add(this.pnlOptionsFooter);
            this.Font = new Font("Tahoma", 8.25f);
            base.FormBorderStyle = FormBorderStyle.SizableToolWindow;
            base.HelpButton = true;
            base.Icon = (Icon) manager.GetObject("$this.Icon");
            this.MinimumSize = new Size(550, 350);
            base.Name = "frmOptions";
            base.StartPosition = FormStartPosition.CenterParent;
            this.Text = "Fiddler Options";
            base.Load += new EventHandler(this.frmOptions_Load);
            this.gbScript.ResumeLayout(false);
            this.gbScript.PerformLayout();
            this.tabsOptions.ResumeLayout(false);
            this.tabGeneral.ResumeLayout(false);
            this.tabGeneral.PerformLayout();
            this.tabHTTPS.ResumeLayout(false);
            this.tabHTTPS.PerformLayout();
            this.tabExtensions.ResumeLayout(false);
            this.gbAutoFiddles.ResumeLayout(false);
            this.gbAutoFiddles.PerformLayout();
            this.tabConnections.ResumeLayout(false);
            this.tabConnections.PerformLayout();
            this.tabAppearance.ResumeLayout(false);
            this.tabTools.ResumeLayout(false);
            this.tabTools.PerformLayout();
            this.pnlOptionsFooter.ResumeLayout(false);
            base.ResumeLayout(false);
        }

        private void lnkCopyPACURL_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Utilities.CopyToClipboard("file:///" + Utilities.UrlPathEncode(CONFIG.GetPath("Pac").Replace('\\', '/')));
        }

        private void lnkFindExtensions_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Utilities.LaunchHyperlink(CONFIG.GetUrl("REDIR") + "FIDDLEREXTENSIONS");
        }

        private void lnkHookup_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Utilities.LaunchHyperlink(CONFIG.GetUrl("REDIR") + "HOOKUP");
        }

        private void lnkHTTPSIntercept_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Utilities.LaunchHyperlink(CONFIG.GetUrl("REDIR") + "HTTPSDECRYPTION");
        }

        private void lnkOptionsHelp_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Utilities.LaunchHyperlink(CONFIG.GetUrl("REDIR") + "OPTIONSHELP");
        }

        private void lnkShowGatewayInfo_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (FiddlerApplication.oProxy.piPrior != null)
            {
                MessageBox.Show(FiddlerApplication.oProxy.piPrior.bUseManualProxies ? FiddlerApplication.oProxy.piPrior.ToString() : ((FiddlerApplication.oProxy.oAutoProxy != null) ? FiddlerApplication.oProxy.oAutoProxy.ToString() : "No upstream gateway proxy was configured."), "System Default Proxy");
            }
        }

        internal void SelectTab(string sTabName)
        {
            foreach (TabPage page in this.tabsOptions.TabPages)
            {
                if (string.Equals(page.Text, sTabName, StringComparison.OrdinalIgnoreCase))
                {
                    this.tabsOptions.SelectedTab = page;
                    break;
                }
            }
        }

        private void tabsOptions_HelpRequested(object sender, HelpEventArgs hlpevent)
        {
            Utilities.LaunchHyperlink(CONFIG.GetUrl("REDIR") + "OPTIONSHELP");
        }
    }
}

